package org.fpp.proxy;

/**
 * @author bigbird-0101
 * @date 2024-06-20 22:52
 */
public class DynamicProxy {
    public static class WanNengHuangNiu{

    }

    public static class MaiPiaoProxy implements MaiPiao {
        private MaiPiao liangjingRu;

        public MaiPiaoProxy() {
            liangjingRu = new MaiPiao() {
                @Override
                public void maiPiao() {

                }
            };
        }

        @Override
        public void maiPiao(){
            liangjingRu.maiPiao();
        }
    }

    public interface MaiPiao{
        void maiPiao();
    }

    public static class MaiShouJiProxy implements MaiShouJi {
        private MaiShouJi maiShouJi;

        public MaiShouJiProxy() {
            maiShouJi = new MaiShouJi() {
                @Override
                public void maiShouJi() {

                }
            };
        }

        @Override
        public void maiShouJi() {
            maiShouJi.maiShouJi();
        }
    }

    public interface MaiShouJi{
        void maiShouJi();
    }
}
